package com.songlanyun.modules.cnarea.dao;

import com.songlanyun.modules.cnarea.entity.CnArea;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * 行政区域
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-13 22:33:46
 */
@Mapper
public interface CnAreaDao extends BaseMapper<CnArea> {

    @Update("truncate table sys_cn_area")
    void truncate();

    @Update("truncate table sys_cn_area_copy1")
    void truncate_test();

    @Update("insert into sys_cn_area_copy1(label, value, parent, level) values (#{label}, #{value}, #{parent}, #{level})")
    void updateAll(CnArea cnArea);
}
